-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
35 lines (28 loc) · 1.32 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String a, b, c;
a = sc.next();
b = sc.next();
c = sc.next();
if (a.equals("vertebrado") && b.equals("ave") && c.equals("carnivoro"))
System.out.println("aguia");
else if (a.equals("vertebrado") && b.equals("ave") && c.equals("onivoro"))
System.out.println("pomba");
else if (a.equals("vertebrado") && b.equals("mamifero") && c.equals("onivoro"))
System.out.println("homem");
else if (a.equals("vertebrado") && b.equals("mamifero") && c.equals("herbivoro"))
System.out.println("vaca");
else if (a.equals("invertebrado") && b.equals("inseto") && c.equals("hematofago"))
System.out.println("pulga");
else if (a.equals("invertebrado") && b.equals("inseto") && c.equals("herbivoro"))
System.out.println("lagarta");
else if (a.equals("invertebrado") && b.equals("anelideo") && c.equals("hematofago"))
System.out.println("sanguessuga");
else if (a.equals("invertebrado") && b.equals("anelideo") && c.equals("onivoro"))
System.out.println("minhoca");
sc.close();
}
}